﻿using BLL;
using MODEL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Loginter.系统维护
{
    public partial class XiTongWeiHu : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            #region 三层架构.连线式

            UserBLL man = new UserBLL();
            int id = Convert.ToInt32(Session["userInfo"]);
            if (id == 0)
            {
                Response.Redirect("../登录用户信息/Login.aspx");
            }
            CurrenUser cur = man.GetUserByID(id);
            //CurrenUser cur = Session["userInfo"] as CurrenUser;
            if (cur != null)
            {
                //姓名
                lab_Name.Text = cur.UserName;
                //性别
                lab_Sex.Text = cur.Sex;
                //电话
                lab_Phone.Text = cur.Phone;
                //邮箱
                lab_Email.Text = cur.Email;
                //角色
                lab_Role.Text = cur.RoleName;
            }
            #endregion
        }
    }
}